package com.ruoyi.merchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.MerchantBankCardsMapper;
import com.ruoyi.merchant.domain.MerchantBankCards;
import com.ruoyi.merchant.service.IMerchantBankCardsService;

/**
 * 商家银行卡Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-23
 */
@Service
public class MerchantBankCardsServiceImpl implements IMerchantBankCardsService 
{
    @Autowired
    private MerchantBankCardsMapper merchantBankCardsMapper;

    /**
     * 查询商家银行卡
     * 
     * @param cardId 商家银行卡主键
     * @return 商家银行卡
     */
    @Override
    public MerchantBankCards selectMerchantBankCardsByCardId(String cardId)
    {
        return merchantBankCardsMapper.selectMerchantBankCardsByCardId(cardId);
    }

    /**
     * 查询商家银行卡列表
     * 
     * @param merchantBankCards 商家银行卡
     * @return 商家银行卡
     */
    @Override
    public List<MerchantBankCards> selectMerchantBankCardsList(MerchantBankCards merchantBankCards)
    {
        return merchantBankCardsMapper.selectMerchantBankCardsList(merchantBankCards);
    }

    /**
     * 新增商家银行卡
     * 
     * @param merchantBankCards 商家银行卡
     * @return 结果
     */
    @Override
    public int insertMerchantBankCards(MerchantBankCards merchantBankCards)
    {
        return merchantBankCardsMapper.insertMerchantBankCards(merchantBankCards);
    }

    /**
     * 修改商家银行卡
     * 
     * @param merchantBankCards 商家银行卡
     * @return 结果
     */
    @Override
    public int updateMerchantBankCards(MerchantBankCards merchantBankCards)
    {
        return merchantBankCardsMapper.updateMerchantBankCards(merchantBankCards);
    }

    /**
     * 批量删除商家银行卡
     * 
     * @param cardIds 需要删除的商家银行卡主键
     * @return 结果
     */
    @Override
    public int deleteMerchantBankCardsByCardIds(String[] cardIds)
    {
        return merchantBankCardsMapper.deleteMerchantBankCardsByCardIds(cardIds);
    }

    /**
     * 删除商家银行卡信息
     * 
     * @param cardId 商家银行卡主键
     * @return 结果
     */
    @Override
    public int deleteMerchantBankCardsByCardId(String cardId)
    {
        return merchantBankCardsMapper.deleteMerchantBankCardsByCardId(cardId);
    }
}
